/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package stack;

/**
 *
 * @author Administrator
 */
import java.util.EmptyStackException;

public interface Stack
{
    /**
     * Tests if this stack is empty.
     * @return true if stack is empty otherwise return false
     */
    public boolean empty();
    /**
     * Looks at the object at the top of this stack without removing it
       from the stack.
     * @return top element
     * @throws java.util.EmptyStackException
     */
	public Object peek()throws EmptyStackException;
    /**
     * Removes the object at the top of this stack and returns it
     * @return top element
     * @throws java.util.EmptyStackException
     */
	public Object pop() throws EmptyStackException;
	/**
     * Pushes an item onto the top of this stack
     * @param item stack new element
     */
    public void push(Object item);
	/**
     * Returns the number of elements in the stack
     * @return stack size
     */
    public int size();
}
